package com.partner.boot.service;

import com.partner.boot.controller.domain.LoginDTO;
import com.partner.boot.controller.domain.ResetPassRequest;
import com.partner.boot.controller.domain.UserRequest;
import com.partner.boot.entity.Permission;
import com.partner.boot.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 菜牙买菜
 * @since 2022-12-07
 */
public interface IUserService extends IService<User> {

    LoginDTO login(UserRequest user);

    User register(UserRequest user);

    void sendEmail(String email, String type);

    void visResetPassEmailCode(String email, String emailCode);

    void resetPass(ResetPassRequest resetPassRequest);

    User saveUser(User user);

    User getUser();

    List<User> findAll();

    LoginDTO findOne(Integer id);

    List<Permission> getPermissions(String roleFlag);

    boolean checkPass(Integer id, String password);

    boolean savePass(Integer id, String password);
}
